package com.fld.fldcodemother.ai;

import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.service.AiServices;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 配置类
 * 定制化ai代码生成助手服务类的bean实例化
 */
@Configuration
public class AiCodeGeneratorServiceFactory {

    @Resource
    private ChatModel qwenChatModel;

    @Bean
    public AiCodeGeneratorService aiCodeGeneratorService () {
        return AiServices.create(AiCodeGeneratorService.class, qwenChatModel);
    }
}
